<%@ page import="DTO.DataDTO" %>
<%@ page import="DTO.UserDTO" %><%--
  Created by IntelliJ IDEA.
  User: G
  Date: 2019/4/12
  Time: 19:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>首页</title>
</head>
<body>
<%
    UserDTO userDTO=(UserDTO) session.getAttribute("userDTO");
    String str1,str2;
    if(userDTO==null) {
        str1 = "login/dgut";str2="登录";
    }
    else {
        str1 = "login/dgout";str2="退出";
    }
%>
<form action=<%=str1%> method="post">
    <button  type="submit"><%=str2%></button>
</form>
<%if(userDTO!=null) {%>
<table>
    <tr>
        <td>username</td>
        <td><%=userDTO.getUsername()%></td>
    </tr>
    <tr>
        <td>name</td>
        <td><%=userDTO.getName()%></td>
    </tr>
    <tr>
        <td>group</td>
        <td><%=userDTO.getGroup()%></td>
    </tr>
    <tr>
        <td>openid</td>
        <td><%=userDTO.getOpenid()%></td>
    </tr>
    <tr>
        <td>wx_openid</td>
        <td><%=userDTO.getWx_openid()%></td>
    </tr>
</table>
<% }%>
</body>
</html>
